package com.zjhome.cloudnote.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import com.zjhome.cloudnote.domain.RecycleInfo;
import com.zjhome.cloudnote.domain.UserInfo;

/**
 * 回收站表 db 接口
 * 
 * @author 0283000121
 *
 */
@Repository
public interface RecycleMapper {
	
	/**
	 * 根据主键查询 回收站项
	 * 
	 * @param id	回收站项id
	 * @param uid	用户id
	 * @return
	 * @throws Exception
	 */
	RecycleInfo selectRecycleById(@Param("id") String id, @Param("uid") String uid) throws Exception;
	
	
	/**
	 * 根据参数查询回收站项
	 * 
	 * @param recycle	过滤条件
	 * @return
	 * @throws Exception
	 */
	List<RecycleInfo> selectRecycleByPara(RecycleInfo recycleInfo) throws Exception;
	
	/**
	 * 创建新 回收站项
	 * 
	 * @param recycle
	 * @return
	 * @throws Exception
	 */
	int insertRecycleByParam(RecycleInfo recycleInfo) throws Exception;

	/**
	 * 更新回收站 项
	 * 
	 * @param recycle
	 * @return
	 * @throws Exception
	 */
	@Deprecated
	int updateRecycleByParam(RecycleInfo recycleInfo) throws Exception;

	/**
	 * 删除回收站项
	 * 
	 * @param id	项id
	 * @param uid	用户id
	 * @return
	 * @throws Exception
	 */
	int deleteRecycleById(@Param("id") String id, @Param("uid") String uid) throws Exception;
}
